<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="shortcut icon" type="image/x-icon"
	th:href="@{/img/favicon.png}">
<title>Spring Boot项目创造者</title>
<link th:href="@{/webjars/bootstrap/4.2.1/css/bootstrap.min.css}"
	rel="stylesheet" />
<link th:href="@{/iconfont/iconfont.css}"
	rel="stylesheet" />
<link th:href="@{/plugin/tag-editor/jquery.tag-editor.css}"
	rel="stylesheet" />	
<link th:href="@{/css/index.css}"
	rel="stylesheet" />	
</head>
<body>

	<div class="container-fluid">
		<div class="row head"></div>
		<div class="row title">
			<div class="col-md-1"></div>
			<div class="col-md-8">
				<h2 class="">
					<img class="img-fluid img-thumbnail logo"
						th:src="@{/img/favicon.png}"><span>Spring Boot
						项目创造者</span>
				</h2>				
			</div>
			<div class="col-sm-2">
				<div class="dropdown">
  <button style="background-color: #eee;"  class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
   简体中文
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" style="width: 7rem;min-width: 7rem;">
    <li ><a th:href="@{/index?lang=en}" style="color: #000;padding-left: 0.8rem;"> 英&nbsp;&nbsp;&nbsp;&nbsp;文</a></li>
  </ul>

</div>
			</div>
		</div>
		<div class="row main">
			<div class="col-md-2"></div>
			<div class="col-md-8">
				<form  th:action="@{/generate}" method="post">
					<div class="form-inline margin-top">
						<div class="form-group">
							<h4>
								生成一个基于 <select class="form-control"><option>Maven 工程</option></select>
								、 Java <select class="form-control" id="javaVersion" name="javaVersion"><option>1.7</option><option>1.8</option></select>
								和 Spring Boot <select class="form-control" id="version" name="springBootVersion"><option>1.5.20</option><option>2.0.9</option><option>2.1.4</option></select>
							项目
							</h4>
						</div>					
					</div>
					<div class="form-group margin-top">
						<h4><i class="icon iconfont icon-fenleiorguangchangorqita"></i> 项目元数据</h4>
						<h6><i class="icon iconfont icon-listview"></i> 工件坐标系&nbsp;<span class="ps"><i class="icon iconfont icon-tishijingti"></i>（工件是项目名称，组是包名。）</span></h6>					
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
						 <label class="control-label label"><span class="err">*</span>工件</label>
   						 <input type="text" onKeyUp="value=value.replace(/[^a-zA-Z0-9_-]/g,'')"  class="form-control input" value="demo" name="artifactId" id="artifactId">
						</div>		
						<div class="form-group">
						 <label class="control-label label"><span class="err">*</span>组</label>
   						 <input type="text" onKeyUp="value=value.replace(/[^a-z0-9_.]/g,'')"  class="form-control input" value="com.demo" name="groupId" id="groupId">
						</div>												
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
						 <label class="control-label label">打包</label>
   						 <select class="form-control input" style="width:12rem;" name="packaging"><option>jar</option><option>war</option></select>
						</div>							
						<div class="form-group">
						 <label class="control-label label">名称</label>
   						 <input type="text"  class="form-control input" style="margin-left: 0.18rem;" value="" name="name" id="name">
						</div>							
					</div>
					<div class="form-group margin-top">
					 <label class="control-label label">简介</label>
					 <textarea class="form-control" name="description" rows="1" cols="1"></textarea>
					</div>
					<div class="form-group margin-top">
						<h4><i class="icon iconfont icon-fenleiorguangchangorqita"></i> Spring Boot 项目配置</h4>											
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2">
							  <input type="checkbox" id="openDataSource" name="openDataSource" value="true">&nbsp;开启数据源
							</label>
							<label class="checkbox-inline label2">
							  <input type="checkbox" id="openView" name="openView" value="true">&nbsp;开启视图
							</label>
							<label class="checkbox-inline label2">
							  <input type="checkbox" id="openLogback" name="openLogback" value="true">&nbsp;开启Logback
							</label>
						</div>																			
					</div>
					<div class="datasource">
						<div class="form-group margin-top">
						 	<h5>数据源配置&nbsp;<span class="ps"><i class="icon iconfont icon-tishijingti"></i>（数据源需在外网环境。）</span></h5>					 
						</div>
						<div class="form-inline margin-top">
							<div class="form-group">
								 <label class="control-label label">类型</label>
		   						 <select class="form-control input" id="type" style="width:12rem;" name="type"><option>oracle</option><option>mysql</option><option>sqlserver</option></select>
							</div>		
							<div class="form-group">
								 <label class="control-label label">连接池类型</label>
		   						 <select class="form-control input" id="poolType" style="width:12rem;" name="poolType"><option>tomcat-jdbc</option><option>druid</option><option>HikariCP</option></select>
							</div>									 
						</div>
						<div class="form-group margin-top">
							 <label class="control-label label"><span class="err">*</span>链接</label>
	   						 <input type="text"  class="form-control input" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL" name="url" id="url">
							</div>	
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>用户名</label>
	   						 <input type="text"  class="form-control input" value="" name="username" id="username">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>密码</label>
	   						 <input type="password" class="form-control input" value="" name="password" id="password">
							</div>										 
						</div>
						<div class="form-inline margin-top">
							<div class="form-group">
								<label class="checkbox-inline label2">
								  <input type="checkbox"  name="tableDocCreated">&nbsp;生成表结构文档&nbsp;<span class="ps"><i class="icon iconfont icon-tishijingti"></i>（数据库里对应的表需要有注释，否则字段说明没有信息。）</span>
								</label>							
							</div>																							
						</div>
					</div>
					<div class="view">
						<div class="form-group margin-top">
						 	<h5>视图配置</h5>					 
						</div>
						<div class="form-inline margin-top">
							<div class="form-group">
							 <label class="control-label label">视图类型</label>
	   						 <select class="form-control input" style="width:10rem;" name="viewType"><option>thymeleaf</option><option>jsp</option><option>freemarker</option></select>
							</div>						
						</div>
					</div>
					<div class="logback">
						<div class="form-group margin-top">
						 	<h5>日志配置</h5>					 
						</div>
						<div class="form-inline margin-top">
						 	<div class="form-group">
								 <label class="control-label label">根路径</label>
		   						 <input type="text"  class="form-control input" value="" placeholder="默认 ${catalina.home}/logs" name="logfilePath" id="logfilePath">
							</div>	
						 	<div class="form-group">
								 <label class="control-label label">文件名</label>
		   						 <input type="text"  class="form-control input" value="" placeholder="默认项目名" name="logfileName" id="logfileName">
							</div>	
						</div>
						<div class="form-inline margin-top">
						 	<div class="form-group">
								 <label class="control-label label">文件有效期</label>
		   						 <input type="text"  class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="" placeholder="默认15，单位天" name="logmaxHistory" id="logmaxHistory">
							</div>	
						 	<div class="form-group">
								 <label class="control-label label">文件大小</label>
		   						 <input type="text"  class="form-control input" value="" placeholder="默认10MB分割" name="logmaxFileSize" id="logmaxFileSize">
							</div>	
						</div>
						<div class="form-group margin-top">
								 <label class="control-label label">输出格式</label>
		   						 <input type="text" style="width: 100%;"  class="form-control input" value="" placeholder="默认【项目名】 %d{yyyy-MM-dd HH:mm:ss.SSS} %p %-4relative --- [%t] %c:%line  ✈✈✈      %m%n" name="logoutFormat" id="logoutFormat">
						</div>
					</div>
					<div class="form-group margin-top">
					 	<h5>依赖集成</h5>					 
					</div>					
					<div class="form-group margin-top " id="db_persistence">
						<h6><i class="icon iconfont icon-listview"></i> 数据持久化管理</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="mybatis-plus">
							  <input type="checkbox"  name="dependency" value="mybatis-plus">&nbsp;Mybatis-plus
							</label>					
						</div>	
						<div class="form-group">
							<label class="checkbox-inline label2" id="jdbc">
							  <input type="checkbox"  name="dependency" value="jdbc">&nbsp;Spring-jdbc
							</label>					
						</div>																							
					</div>
					<div class="mybatis-plus">
						<div class="form-group margin-top">
						 	<h5>Mybatis-Plus配置 <span class="ps"><i class="icon iconfont icon-tishijingti"></i>（根据表名生成实体类。）</span></h5>					 
						</div>
						<div class="form-group">
							 <label class="control-label label">生成表<span class="ps">（添加表的名称，例如：“TEST_USER”。如果不添加的话，所有的表都是默认选中的！）</span></label>
	   						 <input type="text"  class="form-control input" value="" name="table" id="tables">	   				
						</div>		
						<div class="form-group">
							 <label class="control-label label" >表前缀<span class="ps">（去掉表前缀，例如：“TEST_”。）</span></label>
	   						 <input type="text"  class="form-control input" value="" name="tablePrefix" id="tablePrefixs">
						</div>										 															 
					</div>
					
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> 非关系型数据库</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="redis">
							  <input type="checkbox" id="redis" name="dependency" value="redis">&nbsp;Redis
							</label>
							<label class="checkbox-inline label2" id="mongoDB">
							  <input type="checkbox"  name="dependency" value="mongoDB">&nbsp;MongoDB
							</label>						
						</div>																							
					</div>
					<div class="redis">
						<div class="form-group margin-top">
						 	<h5>Redis配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>数据库索引</label>
	   						 <input type="text"  class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="0" name="rdatabase" id="rdatabase">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>主机</label>
	   						 <input type="text" class="form-control input" value="localhost" name="rhost" id="rhost">
							</div>										 
																 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>端口号</label>
	   						 <input type="text" class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="6379" name="rport" id="rport">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>密码</label>
	   						 <input type="password" class="form-control input" value="" name="rpassword" id="rpassword">
							</div>										 															 
						</div>
					</div>
					<div class="mongoDB">
						<div class="form-group margin-top">
						 	<h5>MongoDB配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>数据库名</label>
	   						 <input type="text"  class="form-control input"  value="test" name="mdatabase" id="mdatabase">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>主机</label>
	   						 <input type="text" class="form-control input" value="localhost" name="mhost" id="mhost">
							</div>
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>端口号</label>
	   						 <input type="text" class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="27017" name="mport" id="mport">
							</div>										 
																 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label">用户名</label>
	   						 <input type="text" class="form-control input"  value="" name="musername" id="musername">
							</div>										 
							<div class="form-group">
							 <label class="control-label label">密码</label>
	   						 <input type="password" class="form-control input" value="" name="rpassword" id="rpassword">
							</div>										 															 
						</div>
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> 权限控制管理</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="shiro">
							  <input type="checkbox"  name="dependency" value="shiro">&nbsp;Shiro
							</label>					
						</div>																							
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> 任务调度（定时任务）</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="schedule">
							  <input type="checkbox"  name="dependency" value="schedule">&nbsp;Spring Scheduler
							</label>							
							<label class="checkbox-inline label2" id="quartz">
							  <input type="checkbox"  name="dependency" value="quartz">&nbsp;Quartz Scheduler&nbsp;<span class="ps"><i class="icon iconfont icon-tishijingti"></i>(作持久化，需要数据库支持)</span>
							</label>							
						</div>																							
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> 消息中间件</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="rabbitmq">
							  <input type="checkbox"  name="dependency" value="rabbitmq">&nbsp;RabbitMQ
							</label>							
							<label class="checkbox-inline label2" id="activemq">
							  <input type="checkbox"  name="dependency" value="activemq">&nbsp;ActiveMQ
							</label>							
							<label class="checkbox-inline label2" id="kafka">
							  <input type="checkbox"  name="dependency" value="kafka">&nbsp;Kafka
							</label>							
						</div>																							
					</div>
					<div class="rabbitmq">
						<div class="form-group margin-top">
						 	<h5>RabbitMQ配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>主机</label>
	   						 <input type="text"  class="form-control input" value="localhost"  name="rabbithost" id="rabbithost">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>端口号</label>
	   						 <input type="text" class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="5672" name="rabbitport" id="rabbitport">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>虚拟主机</label>
	   						 <input type="text" class="form-control input" value="/" name="virtualHost" id="virtualHost">
							</div>									 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>用户名</label>
	   						 <input type="text"  class="form-control input" value=""  name="rabbitusername" id="rabbitusername">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>密码</label>
	   						 <input type="password" class="form-control input"  value="" name="rabbitpassword" id="rabbitpassword">
							</div>										 								 
						</div>				
					</div>
					<div class="activemq">
						<div class="form-group margin-top">
						 	<h5>ActiveMQ配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>服务器地址</label>
	   						 <input type="text"  class="form-control input" value="tcp://localhost:61616"  name="activeurl" id="activeurl">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>用户名</label>
	   						 <input type="text" class="form-control input"  value="" name="activeuser" id="activeuser">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>密码</label>
	   						 <input type="password" class="form-control input" value="" name="activepassword" id="activepassword">
							</div>									 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							<label class="checkbox-inline label2" id="activeinMemory">
							  <input type="checkbox"  name="activeinMemory" value="activeinMemory">&nbsp;开启内存模式
							</label>							
							<label class="checkbox-inline label2" id="activepoolEnabled">
							  <input type="checkbox"  name="activepoolEnabled" value="activepoolEnabled">&nbsp;开启连接池
							</label>
							</div>										 															 								 
						</div>				
					</div>
					<div class="kafka">
						<div class="form-group margin-top">
						 	<h5>Kafka配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>服务器地址</label>
	   						 <input type="text"  class="form-control input" value="localhost:9092"  name="bootstrapServers" id="bootstrapServers">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>消费者组ID</label>
	   						 <input type="text" class="form-control input"  value="my-consumer-group-id" name="consumerGroupId" id="consumerGroupId">
							</div>										 														 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							<label class="checkbox-inline label2" id="consumerEnableAutoCommit">
							  <input type="checkbox"  name="consumerEnableAutoCommit" value="consumerEnableAutoCommit">&nbsp;开启消费者自动提交
							</label>														 
							</div>										 															 								 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							<label class="control-label label">消费者自动将偏移重置模式</label>
	   						 <select class="form-control input" style="width:10rem;" name="consumerAutoOffsetReset"><option>earliest</option><option>latest</option><option>none</option></select>
																					 
							</div>										 															 								 
						</div>				
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> 搜索引擎</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="solr">
							  <input type="checkbox"  name="dependency" value="solr">&nbsp;Solr
							</label>							
							<label class="checkbox-inline label2" id="elasticsearch">
							  <input type="checkbox"  name="dependency" value="elasticsearch">&nbsp;Elasticsearch
							</label>							
						</div>																							
					</div>
					
					<div class="solr">
						<div class="form-group margin-top">
						 	<h5>Solr配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>主机地址</label>
	   						 <input type="text"  class="form-control input" value="http://127.0.0.1:8983/solr"  name="solrhost" id="solrhost">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>zookeeper主机地址</label>
	   						 <input type="text" class="form-control input"  value="" name="solrzkHost" id="solrzkHost">
							</div>										 								 
						</div>
					</div>
					<div class="elasticsearch">
						<div class="form-group margin-top">
						 	<h5>Elasticsearch配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>集群名称</label>
	   						 <input type="text"  class="form-control input" value="elasticsearch"  name="esclusterName" id="esclusterName">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>集群节点</label>
	   						 <input type="text" class="form-control input"  value="127.0.0.1:9300" name="esclusterNodes" id="esclusterNodes">
							</div>										 								 
						</div>
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> 其他</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
														
							<label class="checkbox-inline label2" id="mail">
							  <input type="checkbox"  name="dependency" value="mail">&nbsp;Mail
							</label>
																
						</div>																							
					</div>

					<div class="mail">
						<div class="form-group margin-top">
						 	<h5>Mail配置</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>主机</label>
	   						 <input type="text"  class="form-control input" placeholder="例如：smtp.163.com"  name="mailhost" id="mailhost">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>用户名</label>
	   						 <input type="text" class="form-control input" value="" name="mailusername" id="mailusername">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>密码授权码</label>
	   						 <input type="password" class="form-control input" value="" name="mailpassword" id="mailpassword">
							</div>									 
						</div>				
					</div>
					
					<div class="form-group margin-top ">
					 	<h5>开发人员</h5>						 				 
					</div>
					<div class="form-inline margin-top">
					 	<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>姓名</label>
	   						 <input type="text"  class="form-control input" value="" name="author" id="author">
						</div>	
					 </div>
					<div class="row " style="margin-top: 4rem;">
						<div class="col-md-4"></div>
						<div class="col-md-4">
						 	<button type="button" id="generate" class="btn btn-primary btn-lg" style="background: #148C46;margin: 0 auto;"><i class="icon iconfont icon-weibiaoti46"></i> 生成你的项目</button>
						</div>
						<div class="col-md-4"></div>
					</div>
				</form>
			</div>
			<div class="col-sm-2"></div>
		</div>
		<div class="row footer">
			<div class="col-sm-3 text-right"><p>由Stary技术支持</p></div> 
			<div class="col-sm-3"> <p>电子邮箱：stary1993@qq.com</p></div>					 
     		<div class="col-sm-3"><a style="color: #fff;" href="https://gitee.com/stary-springboot/stary_project" ><img class="img-fluid img-thumbnail" th:src="@{/img/gitee_mayun.jpg}" width="40rem" height="40rem"/> 码云</a></div>
		</div>
	</div>

	<script type="text/javascript"
		th:src="@{/webjars/jquery/3.3.1/jquery.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/webjars/popper.js/1.14.6/umd/popper.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/webjars/bootstrap/4.2.1/js/bootstrap.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/webjars/layer/3.1.1/src/layer.js}"></script>
	<script type="text/javascript"
		th:src="@{/plugin/tag-editor/jquery.tag-editor.js}"></script>
	<script  th:inline="javascript">var path=[[${#request.getContextPath()}]];var msg='获取表信息中';</script>
	<script type="text/javascript"
		th:src="@{/js/index.js}"></script>
		<script type="text/javascript">
			$("#generate").click(function(){

				var artifactId=$.trim($("#artifactId").val());
				if(artifactId==''){
					tips('#artifactId','请输入项目名！');
					return;
				}
				var groupId=$.trim($("#groupId").val());
				if(groupId==''){
					tips('#groupId','请输入包名！');
					return;
				}else{
					if(groupId.indexOf('.')<0 || groupId.substring(groupId.length-1,groupId.length)=='.'){
						tips('#groupId','必须包含“.”,且不能在最后面！');
						return;
					}
				}
				if($("#openDataSource").is(":checked")){
					var url=$.trim($("#url").val());
					if(url==''){
						tips('#url','请输入链接！');
						return;
					}
					var username=$.trim($("#username").val());
					if(username==''){
						tips('#username','请输入用户名！');
						return;
					}
					var password=$.trim($("#password").val());
					if(password==''){
						tips('#password','请输入密码！');
						return;
					}
				}
				if($("#mybatis-plus").children().is(":checked")){
					var tables=$('#tables').tagEditor('getTags')[0].tags;				
					$('#tables').val(tables);	
					var tablePrefixs=$('#tablePrefixs').tagEditor('getTags')[0].tags;				
					$('#tablePrefixs').val(tablePrefixs);				
					
				}
				if($("#redis").children().is(":checked")){
					var rdatabase=$.trim($('#rdatabase').val());
					if(rdatabase==''){
						tips('#rdatabase','请输入redis数据库索引！');
						return;
					}
					var rhost=$.trim($('#rhost').val());
					if(rhost==''){
						tips('#rhost','请输入redis主机！');
						return;
					}								
					var rpassword=$.trim($('#rpassword').val());
					if(rpassword==''){
						tips('#rpassword','请输入redis密码！');
						return;
					}								
					
				}				
				if($("#mongoDB").children().is(":checked")){
					var mdatabase=$.trim($('#mdatabase').val());
					if(mdatabase==''){
						tips('#mdatabase','请输入mongoDB数据库名！');
						return;
					}
					var mhost=$.trim($('#mhost').val());
					if(mhost==''){
						tips('#mhost','请输入mongoDB主机！');
						return;
					}								
					var mport=$.trim($('#mport').val());
					if(mport==''){
						tips('#rhost','请输入mongoDB端口号！');
						return;
					}								
					
				}
				if($("#mail").children().is(":checked")){
					var mailhost=$.trim($('#mailhost').val());
					if(mailhost==''){
						tips('#mailhost','请输入mail主机名！');
						return;
					}
					var mailusername=$.trim($('#mailusername').val());
					if(mailusername==''){
						tips('#mailusername','请输入mail用户名！');
						return;
					}
					var mailpassword=$.trim($('#mailpassword').val());
					if(mailpassword==''){
						tips('#mailpassword','请输入mail密码授权码！');
						return;
					}
				}
				if($("#rabbitmq").children().is(":checked")){
					var rabbithost=$.trim($('#rabbithost').val());
					if(rabbithost==''){
						tips('#rabbithost','请输入rabbitMQ主机名！');
						return;
					}
					var rabbitport=$.trim($('#rabbitport').val());
					if(rabbitport==''){
						tips('#rabbitport','请输入rabbitMQ端口号！');
						return;
					}
					var virtualHost=$.trim($('#virtualHost').val());
					if(virtualHost==''){
						tips('#virtualHost','请输入rabbitMQ虚拟主机！');
						return;
					}
					var rabbitusername=$.trim($('#rabbitusername').val());
					if(rabbitusername==''){
						tips('#rabbitusername','请输入rabbitMQ用户名！');
						return;
					}
					var rabbitpassword=$.trim($('#rabbitpassword').val());
					if(rabbitpassword==''){
						tips('#rabbitpassword','请输入rabbitMQ密码！');
						return;
					}
				}
				if($("#activemq").children().is(":checked")){
					var activeurl=$.trim($('#activeurl').val());
					if(activeurl==''){
						tips('#activeurl','请输入activeMQ服务器地址！');
						return;
					}
					var activeuser=$.trim($('#activeuser').val());
					if(activeuser==''){
						tips('#activeuser','请输入activeMQ用户名！');
						return;
					}
					var activepassword=$.trim($('#activepassword').val());
					if(activepassword==''){
						tips('#activepassword','请输入activeMQ密码！');
						return;
					}
				}
				if($("#kafka").children().is(":checked")){
					var bootstrapServers=$.trim($('#bootstrapServers').val());
					if(bootstrapServers==''){
						tips('#bootstrapServers','请输入kafka服务器地址！');
						return;
					}
					var consumerGroupId=$.trim($('#consumerGroupId').val());
					if(consumerGroupId==''){
						tips('#consumerGroupId','请输入activeMQ消费者组ID！');
						return;
					}
				}
				if($("#solr").children().is(":checked")){
					var solrhost=$.trim($('#solrhost').val());
					if(solrhost==''){
						tips('#solrhost','请输入solr主机地址！');
						return;
					}
					var solrzkHost=$.trim($('#solrzkHost').val());
					if(solrzkHost==''){
						tips('#solrzkHost','请输入zookeeper主机地址！');
						return;
					}
				}
				if($("#elasticsearch").children().is(":checked")){
					var esclusterName=$.trim($('#esclusterName').val());
					if(esclusterName==''){
						tips('#esclusterName','请输入elasticsearch集群名称！');
						return;
					}
					var esclusterNodes=$.trim($('#esclusterNodes').val());
					if(esclusterNodes==''){
						tips('#esclusterNodes','请输入elasticsearch集群节点！');
						return;
					}
				}
				if($.trim($("#author").val())==''){
					tips('#author','请输入开发人员姓名！');
					return;					
				}
				$(":text").each(function(){
					$(this).val($.trim($(this).val()));
				});

				layer.msg('生成中...', {
				  icon: 16
				  ,shade: 0.07
				});
				$('form').submit();
				setTimeout(function(){
					layer.closeAll();
				}, 2000);
			});			
		</script>
</body>
</html>